package nl.unimaas.micc.eventSnookerTest.domain;

public class BilliardBall extends Ball
{
	@Override
	public int hashCode()
	{
		return id;
	}
	
	public BilliardBall(int id)
	{
		this.id = id;
	}

	public int getID()
	{
		return id;
	}

	@Override
	public boolean equals(Object b2)
	{
		if(b2 == null){
			return false;
		}
		return ((BilliardBall) b2).getID() == id;
	}


	@Override
	public Object clone()
	{
		BilliardBall b2 = new BilliardBall(id);
		b2.setAngularVelocity(getAngularVelocity());
		b2.setPosition(getPosition());
		b2.setRadius(getRadius());
		b2.setTime(getTime());
		b2.setVelocity(getVelocity());
		b2.setState(getState());
		return b2;
	}
	
	public String toString()
	{
		return id +" "+ super.toString();
	}


	private int id;
}
